// AppDev 专用 MarkdownCMD 样式 - 更紧凑的字体和间距
@import '@/styles/token.less';

.appDevMarkdownCMD {
  // 覆盖默认的 Markdown 样式，使其更紧凑

  // 段落间距
  p {
    margin: 0.6em 0 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  // 标题样式
  h1 {
    font-size: 20px !important;
    margin: 0.8em 0 0.5em !important;
    line-height: 1.4 !important;
  }

  h2 {
    font-size: 18px !important;
    margin: 0.7em 0 0.4em !important;
    line-height: 1.4 !important;
  }

  h3 {
    font-size: 16px !important;
    margin: 0.6em 0 0.4em !important;
    line-height: 1.4 !important;
  }

  h4 {
    font-size: 15px !important;
    margin: 0.5em 0 0.3em !important;
    line-height: 1.4 !important;
  }

  h5 {
    font-size: 14px !important;
    margin: 0.4em 0 0.3em !important;
    line-height: 1.4 !important;
  }

  h6 {
    font-size: 13px !important;
    margin: 0.3em 0 !important;
    line-height: 1.4 !important;
  }

  // 列表样式
  ul,
  ol {
    margin: 0.5em 0 !important;
    padding-left: 1.2em !important;

    li {
      margin: 0.3em 0 !important;
      font-size: 14px !important;
      line-height: 1.5 !important;
    }
  }

  // 代码块样式
  pre {
    margin: 0.6em 0 !important;
    padding: 0.8em !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
  }

  code {
    font-size: 12px !important;
    padding: 0.15em 0.4em !important;
  }

  // 引用样式
  blockquote {
    margin: 0.5em 0 !important;
    padding: 0.4em 0.8em !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  // 表格样式
  table {
    font-size: 13px !important;
    margin: 0.5em 0 !important;

    th,
    td {
      padding: 0.4em 0.6em !important;
      line-height: 1.4 !important;
    }
  }

  // 水平分割线
  hr {
    margin: 0.8em 0 !important;
  }

  // 链接样式
  a {
    font-size: 14px !important;
  }

  // 强调文本
  strong,
  b {
    font-size: 14px !important;
  }

  em,
  i {
    font-size: 14px !important;
  }

  // 删除线
  del,
  s {
    font-size: 14px !important;
  }

  // 内联代码
  code:not(pre code) {
    background: #f5f5f5 !important;
    border-radius: 3px !important;
    font-family: @fontFamilyCode !important;
  }

  // 代码块
  pre code {
    font-family: @fontFamilyCode !important;
    background: transparent !important;
    padding: 0 !important;
  }

  .ds-markdown-table {
    th,
    td {
      font-size: 12px !important;
    }
  }
}
